﻿using System;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace Curriculum.Business.LectorMetadatos
{

	[XmlRoot(Namespace="", IsNullable=false)]
	[Serializable]
	public class ListaAntecedentesXML//:IEnumerable
	{
		/// <remarks/>
		[XmlElement("antecedente", Form=XmlSchemaForm.Unqualified)]
		public Antecedente[] antecedentes;

//		#region IEnumerable Members
//		public IEnumerator GetEnumerator()
//		{
//			return antecedentes.GetEnumerator();
//		}
//		public void Add(object valor)
//		{
//			antecedentes.SetValue(valor, antecedentes.Length);
//		}
//		#endregion

	}

	[Serializable]
	public class atributoAntecedente
	{
		[XmlAttribute()]
		public string idAtributo;
	}
	
	[XmlRoot(Namespace="", IsNullable=false)]
	[Serializable]
	public class ListaAtributoAntecedente 
	{
		/// <remarks/>
		[XmlElement("atributo", Form=XmlSchemaForm.Unqualified)]
		public atributoAntecedente[] atributos;

//		#region IEnumerable Members
//		public IEnumerator GetEnumerator()
//		{
//			return atributos.GetEnumerator();
//		}
//		#endregion
	}

	/// <summary>
	/// Summary description for Antecedentes.
	/// </summary>
	[Serializable]
	public class Antecedente
	{
		[XmlAttribute()]
		public string idAntecedente;

		[XmlAttribute()]
		public bool agregacion;
		
		[XmlElement(Form=XmlSchemaForm.Unqualified)]
		//[System.Xml.Serialization.XmlElementAttribute("atributo", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public ListaAtributoAntecedente atributos;

		[XmlElement(Form=XmlSchemaForm.Unqualified)]
		public string nombre;

		public ListaAntecedentesXML antecedentesXML;
	}
	
}
